package com.mec.fileTransfer.core;

public class FileBlockInfo {
	private long offset;
	private long length;
	
	protected FileBlockInfo() {
	}
	
	protected FileBlockInfo(long offset, long length) {
		super();
		this.offset = offset;
		this.length = length;
	}

	long getOffset() {
		return offset;
	}
	void setOffset(long offset) {
		this.offset = offset;
	}
	long getLength() {
		return length;
	}
	void setLength(int length) {
		this.length = length;
	}
	

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (length ^ (length >>> 32));
		result = prime * result + (int) (offset ^ (offset >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FileBlockInfo other = (FileBlockInfo) obj;
		if (length != other.length)
			return false;
		if (offset != other.offset)
			return false;
		return true;
	}
	
	
	
}
